import cv2
from core.Camera import Camera

vedio = Camera('http://192.168.123.13:5000/video1')

t = 5
while True:
    frame = vedio.getframe()
    # cv2.imshow('test', frame)

    t -= 1
    if not t:
        cv2.imwrite('test.jpg', frame)
        break
    
    waitkey = cv2.waitKey(1)
    if waitkey == ord('q'): break
